import common from './common'
import paths from './paths'

const reportService = {};

(function (service) {
    /**
     * 获取报表预览地址
     * @param {String} reportRevisionId
     * @returns
     */
    service.previewReport = function (reportRevisionId, paramsMap) {
      return common.post(paths.report.previewReport, { reportRevisionId: reportRevisionId }, paramsMap)
    }

    /**
     * 通过报表id获取报表版本列表
     * @param {String} reportId
     * @returns
     */
    service.listReportRevisionByReportId = function (reportId) {
        return common.get(paths.report.listReportRevisionByReportId, { reportId: reportId })
    }
})(reportService)

export default reportService
